﻿<navigation:Page xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk"  x:Class="SilverlightShowWCFRIAColl.Views.CollectionViewView" 
           xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
           xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
           xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
           xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
           mc:Ignorable="d"
           xmlns:navigation="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Navigation"
           d:DesignWidth="640" d:DesignHeight="480"
                 xmlns:local="clr-namespace:SilverlightShowWCFRIAColl"
                 xmlns:dts="clr-namespace:SilverlightShowWCFRIAColl"
                 Title="CollectionViewView Page">

    <Grid x:Name="LayoutRoot">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"></RowDefinition>
            <RowDefinition Height="Auto"></RowDefinition>
            <RowDefinition></RowDefinition>
        </Grid.RowDefinitions>

        <TextBlock Text="Collection View"
                   FontSize="18"></TextBlock>

        <StackPanel Orientation="Horizontal"
                    Grid.Row="1"
                    Margin="0,10">
            <Button Command="{Binding LoadMoreBooks}"
                    Width="150"
                    Content="Load more"></Button>
            <Button Command="{Binding AddBook}"
                    Width="150"
                    Content="Add book"></Button>
            <Button Command="{Binding DeleteBook}"
                    Width="150"
                    Content="Delete book"></Button>
            <Button Command="{Binding AddFilter}"
                    Width="150"
                    Content="Add filter"></Button>
            <Button Command="{Binding AddSort}"
                    Width="150"
                    Content="Add sorting"></Button>
            <Button Command="{Binding AddGrouping}"
                    Width="150"
                    Content="Add grouping"></Button>
            <Button Command="{Binding Refresh}"
                    Width="150"
                    Content="Refresh"></Button>
            
        </StackPanel>

        <sdk:DataGrid  Grid.Row="2"
                       ItemsSource="{Binding Books}" />
        
        <!--<ListBox Grid.Row="2"
                 ItemsSource="{Binding Books}"
                >
            <ListBox.ItemTemplate>
                <DataTemplate>
                    <StackPanel Orientation="Vertical">
                        <TextBlock Text="{Binding Title}"></TextBlock>
                        <TextBlock Text="{Binding Author}"></TextBlock>
                    </StackPanel>
                </DataTemplate>
             </ListBox.ItemTemplate>
        </ListBox>-->

    </Grid>
</navigation:Page>
